package xx.iverson.school_manage.service.impl;

import org.springframework.stereotype.Service;
import xx.iverson.school_manage.log.Loggable;
import xx.iverson.school_manage.mapper.TitleMapper;
import xx.iverson.school_manage.service.TitleService;

import javax.annotation.Resource;

/**
 * @author wei77
 */
@Service
public class TitleServiceImpl implements TitleService {

    @Resource
    private TitleMapper titleMapper;


    @Override
    public String getTitle(Integer id) {
        return titleMapper.selectTitle(id);
    }

    @Override
    @Loggable("修改标题")
    public boolean updateTitle(String newTitle, Integer id) {
        return titleMapper.updateTitle(newTitle, id) != null;
    }
}